package com.loiot.baqi.pojo;

import com.loiot.baqi.constant.DictionaryUtil;
import com.loiot.baqi.status.AssignmentStatus;
import com.loiot.baqi.status.BusinessQqGroupCooperationStatus;
import com.loiot.baqi.status.DictionaryType;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * QQ群 实体类
 * 
 * @author wangzx
 * @creation 2016-03-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class TgQqGroup implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;

	private java.lang.Long id; // id db_column: id
	private java.lang.String number; // 群号 db_column: number
	private java.lang.String name; // 群名称 db_column: name
	private java.lang.Long category; // 群分类 db_column: category
	private java.lang.String validateMessage; // 群验证信息 db_column:
												// validate_message
	private java.util.Date inTime; // 录入时间 db_column: in_time
	private java.lang.Long inPerson; // 录入人 db_column: in_person
	private Integer assignmentStatus;  //微商用户分配状态 （1未分配，2已分配） db_column: assignment_status 
	private java.lang.Integer qqMemberCount;  //qq成员数 db_column: qq_member_count 
	
	private java.lang.String leaderNumber;  //群主qq号 db_column: leader_number 
    private java.lang.String leaderNickname;  //群主昵称 db_column: leader_nickname 
    private java.lang.Integer leaderCount;  //管理员数量 db_column: leader_count 
    private java.util.Date updateTime;  //更新时间 db_column: update_time 
    private java.lang.String groupDesc;  //群简介 db_column: group_desc 
    private Integer businessAssignmentStatus;  //当前商务洽谈分配状态 （1未分配，2已分配） db_column: business_assignment_status 
    private java.lang.Long qqGroupBusinessId;  //当前商务洽谈表的id db_column: qq_group_business_id 
    private java.lang.Long currWeiAccountId;  //当前商务洽谈表的id db_column: qq_group_business_id 
    
    ZpJlStatisticsInfo jlStatisticsInfo = new ZpJlStatisticsInfo();
    /**
	 * 录入人姓名
	 */
	private String inPersonName;
	/**
	 * 分配状态码
	 */
	private Integer assignmentStatusCode;

	public TgQqGroup() {
	}

	public TgQqGroup(java.lang.Long id) {
		this.id = id;
	}

	/**
	 * 根据分配状态编码获取分配状态名称.
	 * 
	 * @return 分配状态名称
	 */
	public String getAssignmentStatusName() {
		if (this.assignmentStatusCode == null) {
			return "";
		}
		AssignmentStatus assignmentType = AssignmentStatus.get(this.assignmentStatusCode);
		return assignmentType == null ? "" : assignmentType.getTitle();
	}
	
	 public String getCategoryName(){
		  if(this.category!=null){
			  //return BusinessQqGroupCooperationStatus.get(this.category).getTitle();
			  return DictionaryUtil.getName(DictionaryType.JOB_POSITION.getCode(),this.category );
		  }
		  return null;
	  } 
}
